package com.cms.bs.config;

import com.avaje.ebean.config.CurrentUserProvider;
import com.cms.bs.app.model.User;

/**
 * Created by jiang on 2016-09-23.
 */
public class CurrentUser implements CurrentUserProvider {

    @Override
    public Object currentUser() {
        User user = (User) SessionHelper.get(Constants.CURRENT_USER);
        if(user!=null){
            return user.getName();
        }
        return "currentUserErr";
    }

}